<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <title>TODO supply a title</title>
    </head>
    <body>
        <ui:composition>
            <f:loadBundle basename="monitoring.autocomplete.label_#{logged.loggedIdiom}" var="labelAutoComplete" />
            <h:form id="formAutocomplete">
                <p:autoComplete id="buscar" styleClass="searchBox" size="30" 
                                value="#{monitoring_autoCompleteFind.selected}"
                                completeMethod="#{monitoring_autoCompleteFind.autoComplete}"
                                var="p" maxResults="10"
                                itemLabel=""
                                itemValue="#{p}" 
                                converter="monitoring_autoCompleteFind"
                                >
                    <p:column>
                        <h:panelGroup layout="block" class="acTitle">#{p.userBeans.nombre} #{p.userBeans.apellido}</h:panelGroup>
                        <div>#{labelAutoComplete.field1}: #{p.gpsBeans.imei}</div>
                        <div>#{labelAutoComplete.field2}: #{p.gpsBeans.marca}</div>
                        <div>#{labelAutoComplete.field3}: #{p.gpsBeans.modelo}</div>
                        <div>#{labelAutoComplete.field4}: #{p.gpsBeans.numero_serie}</div>
                    </p:column>
                    <p:ajax event="itemSelect" listener="#{monitoring_general.load()}"  update=":contentRefresher"/>
                </p:autoComplete>

                <p:watermark for="buscar" value="#{autocompleteLabel.watermark}"/>
                
            </h:form>
        </ui:composition>
    </body>
</html>
